package com.szxy.hotel.service;

import com.szxy.hotel.entity.Admin;
import com.szxy.hotel.mapper.AdminMapper;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;

@Service("adminService")
public class AdminService {
    @Resource
    AdminMapper adminMapper;

    public Admin findByuserAccount(String userAccount) {
        return adminMapper.findByuserAccount(userAccount);
    }

    public int doRegist(String userAccount, String userPassword, String userAnswer, String selectType, String selectHobby, int userStatusid) {
        return adminMapper.doRegist(userAccount,userPassword,userAnswer,selectType,selectHobby,userStatusid);
    }

    public int doUpdatepassword(String userName, String userPassword) {
        return adminMapper.doUpdatepassword(userName,userPassword);
    }

    public int doDecode(String username) {
        return adminMapper.doDecode(username);
    }

    public int overDecode(String uname) {
        return adminMapper.overDecode(uname);
    }
}
